CE Gobi SDK  2.14
GobiApi
Audio Service

Functions

IMPORTGOBI ULONG GOBICMAPI AudioGetProfile (BYTE *pGenerator, BYTE *pProfile, BYTE *pEarMute, BYTE *pMicMute, BYTE *pVolume)
 
IMPORTGOBI ULONG GOBICMAPI AudioSetProfile (BYTE *pProfile, BYTE *pEarMute, BYTE *pMicMute, BYTE *pGenerator, BYTE *pVolume)
 
IMPORTGOBI ULONG GOBICMAPI AudioGetPathByte (BYTE *pProfile, BYTE *pItem, BYTE *pValue)
 
IMPORTGOBI ULONG GOBICMAPI AudioGetPathWord (BYTE *pProfile, BYTE *pItem, WORD *pValue)
 
IMPORTGOBI ULONG GOBICMAPI AudioGetPathPCMFilter (BYTE *pProfile, BYTE *pItem, WORD *pPCMFilterFlag, WORD *pPCMFilterStageCount, DWORD *pPCMFilterStageValue, WORD *pPCMFilterStageSize)
 
IMPORTGOBI ULONG GOBICMAPI AudioSetAudioPath (BYTE *pProfile, BYTE *pEchoCancel, BYTE *pNoiseSuppression, WORD *pTXVol, WORD *pSTGain, WORD *pTXPCMFilterFlag, WORD *pTXPCMFilterStageCount, DWORD *pTXPCMFilterStageValue, WORD *pTXPCMFilterStageSize, WORD *pRXPCMFilterFlag, WORD *pRXPCMFilterStageCount, DWORD *pRXPCMFilterStageValue, WORD *pRXPCMFilterStageSize, BYTE *pRXAvcAgcSwitch, BYTE *pTXAvcAgcSwitch)
 
IMPORTGOBI ULONG GOBICMAPI AudioGetVolTLBConfig (BYTE *pProfile, BYTE *pGenerator, BYTE *pVolume, BYTE *pItem, WORD *pValue)
 
IMPORTGOBI ULONG GOBICMAPI AudioSetVolTLBConfig (BYTE *pProfile, BYTE *pGenerator, BYTE *pVolume, BYTE *pItem, WORD *pInValue, WORD *pOutValue)
 
IMPORTGOBI ULONG GOBICMAPI AudioPlayAudioTone (BYTE *pGenerator, BYTE *pTone, WORD *pDuration)
 

Detailed Description

Function Documentation

IMPORTGOBI ULONG GOBICMAPI AudioGetPathByte ( BYTE *  pProfile,
BYTE *  pItem,
BYTE *  pValue 
)

The message requests to get the a setting of an audio path config item that is a Byte value. AUDIOI_CMD_VAL_GET_AUDIO_PATH_CONFIG_REQ 0x64

Parameters
pProfile[I] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pItem[I] Item to retrieve
  • 0x00 – AV_EC
  • 0x01 – AV_NS
  • 0x08 – AV_RXAGC
  • 0x09 – AV_TXAGC
pValue[O] Value of the item retrieved
  • 0x00 – AV_EC - Echo Cancellation Mode 0 – Echo cancellation off 1 – Handset mode 2 – Headset mode 3 – Car kit mode 4 – Speaker mode
  • 0x01 – AV_NS 0 – Noise suppression off 1 – Noise suppression on
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioGetPathPCMFilter ( BYTE *  pProfile,
BYTE *  pItem,
WORD *  pPCMFilterFlag,
WORD *  pPCMFilterStageCount,
DWORD *  pPCMFilterStageValue,
WORD *  pPCMFilterStageSize 
)

The message requests to get the a setting of an audio path config item that is a PCM filter. AUDIOI_CMD_VAL_GET_AUDIO_PATH_CONFIG_REQ 0x64

Parameters
pProfile[I] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pItem[I] Item to retrieve
  • 0x05 - AV_TXPCMIIRFLTR
  • 0x06 - AV_RXPCMIIRFLTR
pPCMFilterFlag[O] IRR filter flag
  • 0x0000 – IIR filter disable
  • 0xffff – IIR filter enable
pPCMFilterStageCount[O] Number of IRR filter stage (0-4)
pPCMFilterStageValue[O] Values of the stages (up to 4 stages)
pPCMFilterStageSize[I] Size of pPCMFilterStageValue, must be 25
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioGetPathWord ( BYTE *  pProfile,
BYTE *  pItem,
WORD *  pValue 
)

The message requests to get the a setting of an audio path config item that is a Word value. AUDIOI_CMD_VAL_GET_AUDIO_PATH_CONFIG_REQ 0x64

Parameters
pProfile[I] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pItem[I] Item to retrieve
  • 0x02 - AV_TXVOL
  • 0x04 - AV_CODECSTG
pValue[O] Value of the item retrieved
  • 0x02 - AV_TXVOL (0x0000 – 0xffff)
  • 0x04 - AV_CODECSTG (0x0000 – 0xffff)
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioGetProfile ( BYTE *  pGenerator,
BYTE *  pProfile,
BYTE *  pEarMute,
BYTE *  pMicMute,
BYTE *  pVolume 
)

The message requests to get the profile content of the requested generator. AUDIOI_CMD_VAL_GET_AUDIO_PROFILE_REQ 0x60

Parameters
pGenerator[I] Audio generator
  • 0 – Voice
  • 1 – Key Beep
  • 2 – MIDI
pProfile[O] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pEarMute[O] Ear mute setting
  • 0 – unmuted
  • 1 – muted
pMicMute[O] MIC mute setting
  • 0 – unmuted
  • 1 – muted
pVolume[O] Audio volume level (0-7)
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioGetVolTLBConfig ( BYTE *  pProfile,
BYTE *  pGenerator,
BYTE *  pVolume,
BYTE *  pItem,
WORD *  pValue 
)

The message requests to get the volume value of a volume level of a requested item. AUDIOI_CMD_VAL_GET_AUDIO_VOl_TLB_CONFIG_REQ 0x66

Parameters
pProfile[I] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pGenerator[I] Audio generator
  • 0 – Voice
  • 1 – Key Beep
  • 2 – MIDI
pVolume[I] Audio volume level (0-7)
pItem[I] The item to be retrieved
  • 13 - AV_RXVOLDB
  • 14 - AV_DTMFVOLDB
  • 15 - AV_PAD
pValue[O] Value of the item retrieved
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioPlayAudioTone ( BYTE *  pGenerator,
BYTE *  pTone,
WORD *  pDuration 
)

This message requests device to play a audio tone. AUDIOI_CMD_VAL_PALY_AUDIO_TONE 0xF1

Parameters
pGenerator[I] Audio generator
  • 0 – Voice
  • 1 – Key Beep
  • 2 – MIDI
pTone[I] Tone value (0x00 – 0x57)
pDuration[I] Duration of the tone
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioSetAudioPath ( BYTE *  pProfile,
BYTE *  pEchoCancel,
BYTE *  pNoiseSuppression,
WORD *  pTXVol,
WORD *  pSTGain,
WORD *  pTXPCMFilterFlag,
WORD *  pTXPCMFilterStageCount,
DWORD *  pTXPCMFilterStageValue,
WORD *  pTXPCMFilterStageSize,
WORD *  pRXPCMFilterFlag,
WORD *  pRXPCMFilterStageCount,
DWORD *  pRXPCMFilterStageValue,
WORD *  pRXPCMFilterStageSize,
BYTE *  pRXAvcAgcSwitch,
BYTE *  pTXAvcAgcSwitch 
)

The message requests to set the audio path configuration parameters AUDIOI_CMD_VAL_SET_AUDIO_PATH_CONFIG_REQ 0x65

Parameters
pProfile[I] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pEchoCancel[I] AV_EC - Echo Cancellation Mode
  • 0 – Echo cancellation off
  • 1 – Handset mode
  • 2 – Headset mode
  • 3 – Car kit mode
  • 4 – Speaker mode
pNoiseSuppression[I] AV_NS Noise Suppression
  • 0 – Noise suppression off
  • 1 – Noise suppression on
pTXVol[I] TX Voice Volume (0x0000 – 0xffff)
pSTGain[I] CODEC ST gain (Sidetone Gain) (0x0000 – 0xffff)
pTXPCMFilterFlag[I] TX IRR filter flag
  • 0x0000 – IIR filter disable
  • 0xffff – IIR filter enable
pTXPCMFilterStageCount[I] Number of TX IRR filter stage (0-4)
pTXPCMFilterStageValue[I] Values of the stages (up to 4 stages)
pTXPCMFilterStageSize[I] Size of pTXPCMFilterStageValue, must be 25
pRXPCMFilterFlag[I] RX IRR filter flag
  • 0x0000 – IIR filter disable
  • 0xffff – IIR filter enable
pRXPCMFilterStageCount[I] Number of RX IRR filter stage (0-4)
pRXPCMFilterStageValue[I] Values of the stages (up to 4 stages)
pRXPCMFilterStageSize[I] Size of pRXPCMFilterStageValue, must be 25
pRXAvcAgcSwitch[I] RX AVC/AGC switch
pTXAvcAgcSwitch[I] TX AVC/AGC switch
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioSetProfile ( BYTE *  pProfile,
BYTE *  pEarMute,
BYTE *  pMicMute,
BYTE *  pGenerator,
BYTE *  pVolume 
)

The message requests to set set audio profile. AUDIOI_CMD_VAL_SET_AUDIO_PROFILE 0x61

Parameters
pProfile[I] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pEarMute[I] Ear mute setting
  • 0 – unmuted
  • 1 – muted
pMicMute[I] MIC mute setting
  • 0 – unmuted
  • 1 – muted
pGenerator[I] Audio generator
  • 0 – Voice
  • 1 – Key Beep
  • 2 – MIDI
pVolume[I] Audio volume level (0-7)
Returns
See GobiErrorCodes.h
IMPORTGOBI ULONG GOBICMAPI AudioSetVolTLBConfig ( BYTE *  pProfile,
BYTE *  pGenerator,
BYTE *  pVolume,
BYTE *  pItem,
WORD *  pInValue,
WORD *  pOutValue 
)

The message requests to get the volume value of a volume level of a requested item. AUDIOI_CMD_VAL_SET_AUDIO_VOl_TLB_CONFIG_REQ 0x67

Parameters
pProfile[I] Audio profile
  • 0 – Handset
  • 1 – Headset
  • 2 – Car kit
  • 3 – Speaker phone
  • 4 – Auxiliary
  • 5 – TTY
  • 6 – Auxiliary external PCM
  • 7 – Primary external PCM
  • 8 – External slave PCM
  • 9 – I2S
pGenerator[I] Audio generator
  • 0 – Voice
  • 1 – Key Beep
  • 2 – MIDI
pVolume[I] Audio volume level (0-7)
pItem[I] The item to be retrieved
  • 13 - AV_RXVOLDB
  • 14 - AV_DTMFVOLDB
  • 15 - AV_PAD
pInValue[I] Value of the item
pOutValue[O] Result of the item
Returns
See GobiErrorCodes.h